package com.xnyzc.lhy.mis.controller.cmsapi.punishment;


import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.entity.param.cms.OfficeParam;
import com.xnyzc.lhy.mis.service.punishment.IOaDUserPenaltyDetailService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;


/**
 * <p>
 * 违规司机详情表 前端控制器
 * </p>
 *
 * @author cuichaoqun
 * @since 2019-10-27
 */
@RestController
@Api(value="查询司机处罚详情",tags={"查询司机处罚详情"})
@RequestMapping("/cmsapi/oaDUserPenaltyDetail")
public class OaDUserPenaltyDetailController {
    @Autowired
    private IOaDUserPenaltyDetailService iOaDUserPenaltyDetailService;

    /**
     * 查询司机处罚详情
     * */
    @ApiOperation(value = "查询司机处罚详情", notes = "查询司机处罚详情")
    @GetMapping(value = "/queryOaDUserPenaltyDetail")
    public Rv queryOaDUserPenaltyDetail(Long driverId) {
        return iOaDUserPenaltyDetailService.queryOaDUserPenaltyDetail(driverId);
    }

    /**
     * 导出处罚记录
     * */
    @ApiOperation(value = "导出处罚记录：", notes = "导出处罚记录：")
    @GetMapping(value = "/exportPunishmentRecord")
    public Rv exportPunishmentRecord(Date startDate, Date endDate) {
        return iOaDUserPenaltyDetailService.exportPunishmentRecord(startDate, endDate);
    }

    /**
     * 导出待处罚司机
     * */
    @ApiOperation(value = "导出待处罚司机：", notes = "导出待处罚司机：")
    @GetMapping(value = "/exportDriverPunished")
    public Rv exportDriverPunished(Date startDate, Date endDate) {
        return iOaDUserPenaltyDetailService.exportDriverPunished(startDate, endDate);
    }


}
